package com.cs.study.homework._0216;

public class Demo {
    public static void main(String[] args) {
        Teacher t1 = new Teacher("张三", 18, "男", 1);
        Teacher t2 = new Teacher("李四", 25, "女",  2);
        t1.printTeacher();
        t2.printTeacher();


    }
}

class Teacher {
    String name;
    int age;
    String gender;
    int teacherId;

    public Teacher(String name){
        this.name = name;
    }

    public Teacher(String name, int teacherId){
        this.name = name;
        this.teacherId = teacherId;
    }

    public Teacher(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Teacher(String name, int age, String gender, int teacherId) {
        this(name, age, gender);
        this.teacherId = teacherId;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void printTeacher() {
        System.out.println("姓名：" + this.name + " 年龄：" + this.age + " 性别：" + this.gender + " 编号：" + this.teacherId);
    }

}
